<?php


class DocumentVersionFilesTable extends Doctrine_Table
{
    
    public static function getInstance()
    {
        return Doctrine_Core::getTable('DocumentVersionFiles');
    }
    
    public static function findAllExistingFilesOfDocument($document_id,$version_id)
    {
        if (!empty($document_id) && !empty($version_id))
        {
          return DocumentVersionFilesTable::getInstance()
            ->createQuery('f')
            ->select('f.*')
            ->andWhere("f.document_id=?", $document_id)
            ->andWhere("f.document_version=?", $version_id)
           // ->andWhere("f.is_deleted=?", false)
            ->execute();
        }
        return null;
    }

    
}